package com.itmuch.cloud.fallback;

import com.itmuch.cloud.feign.UserFeignClient;
import com.itmuch.cloud.pojo.User;
import org.springframework.stereotype.Component;

/**
 * 远程服务调用失败时的降级处理类
 */
@Component
public class UserFeignFallback implements UserFeignClient {
    @Override
    public User findById(Long id) {
        User user = new User();
        user.setUsername("本地feign降级处理");
        return user;
    }
}
